<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>咨询建议</title>
    <meta name="viewport"
          content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="css/mui.min.css">
    <link rel="stylesheet" type="text/css" href="css/mui.picker.min.css"/>
    <link rel="stylesheet" href="css/grandeHealth.css">
    <style>
			.mui-navigate-right:after, .mui-push-right:after {font-size: 26px;}
			.mui-input-group .mui-input-row:after {left: 0;}
			.mui-input-group .tonyli-row{border-bottom: 1px solid #ccc;padding-left: 15px;}			
			.mui-input-group .tonyli-row label{width:40%;line-height: 40px;}
			.mui-input-group .tonyli-row input{width:60%;}				
			.mui-table-view{margin-top: 5px;}
			.mui-table-view .mui-table-view-record{padding: 15px 15px;}
			.mui-table-view .mui-pull-left{width: 25px;height: 25px;margin-right: 10px;}
			.mui-table-view .mui-pull-right{width: 20px;height: 20px;}
			.mui-table-view label{font-size: 16px;color: #333;}
			.mui-table-view textarea{font-size: 16px;border: none;padding: 0;margin-top: 10px;margin-bottom: 0;}		
			.medication_plan{height: 30px;font-size: 15px;}
			.medication_plan h4{float: left;}
			.medication_fa label{width: 15%;float: left;margin-top: 3px;}
			.newmedica p{color: #333;line-height: 30px;float: left;width: 85%;}
			input[type=button]{height: 40px;text-align: left;color: #000;}
			.mui-popup-button.mui-popup-button-bold {font-weight: normal;}

			/*线上病历详情*/
			#online_details{font-size: 16px;}
			#online_details input{font-size: 16px;}
			#online_details .tonyli-row{border-bottom: 1px solid #ccc;padding-left: 15px;}
			#online_details .tonyli-row label{width:40%;}
			#online_details .tonyli-row input{width:60%;}
			#online_details .mui-row .tonyli-row{border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;}
			#online_details .tige{padding: 10px 15px;}
			#online_details .tige .tige-row{}
			#online_details .tige .tige-row label{float: left;width: 36px;}
			#online_details .tige .tige-row input{padding:0;text-align: left;width: 37%;border-bottom: 1px solid #ccc;height: 20px;margin-top: 10px;}
			
			.mui-table-view:before,.mui-table-view:after{height: 0;}
			.tige .mui-row .mui-col-sm-6{display: none;}
			.mui-table-view .mui-table-view-cell .ccyc{
				line-height: 25px;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3;overflow: hidden;color: #333;margin-top: 10px;}
		 	.mui-navigate-right1:after{
       			top: 8%;
       			left: 88%;content: '\e583';
       			font-family: Muiicons;
			    font-size: inherit;
			    line-height: 1;
			    position: absolute;
			    display: inline-block;
			    -webkit-transform: translateY(-50%);
			    transform: translateY(-50%);
			    text-decoration: none;
			    color: #bbb;
			    -webkit-font-smoothing: antialiased;
			    font-size: 26px;
       		}
       		.mui-content{
       		margin-top:-65px
       		}













    </style>
</head>
<body>
<!--<header class="mui-bar mui-bar-nav" style="display: block;height: 64px;padding-top:20px">-->
<!--<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>-->
<!--<button id="submit" style="float: right;">保存</button>-->
<!--</header>-->

<div class="mui-content">
    <div class="mui-content-padded" style="margin: 0;">
        <form class="mui-input-group" id="online_details">
            <div class="mui-row">
                <div class="mui-col-sm-6 mui-col-xs-6">
                    <div class="tonyli-row">
                        <label>姓名:</label>
                        <input type="text" id="name" name="name" value=""/>
                    </div>
                </div>
                <div class="mui-col-sm-6 mui-col-xs-6">
                    <div class="tonyli-row">
                        <label>性别:</label>
                        <input type="text" id="sex" name="sex" value=""/>
                    </div>
                </div>
            </div>
            <!--<div class="tonyli-row">
                <label>出生年月:</label>
                <input type="button" id="birthday" name="birthday" value=""/>
            </div>-->
            <div class="tonyli-row">
                <label>年龄:</label>
                <input type="text" maxlength="3" onkeyup="value=value.replace(/[^0-9]/g,'')"
                       id="age" name="age" value=""/>
            </div>

            <div class="tonyli-row">
                <label>医保卡号:</label>
                <input type="text" id="idCard" name="idCard" value=""
                       onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')"/>
            </div>

            <div class="tonyli-row">
                <label>就诊卡号:</label>
                <input type="text" id="viscard" name="viscard" value=""
                       onkeyup="value=value.replace(/[^\a-\z\A-\Z0-9]/g,'')"/>
            </div>

            <div class="tonyli-row">
                <label>预约门诊就诊时间:</label>
                <input style="width: 55%;" type="button" id="offlineTime" name="offlineTime"
                       value=""/>
            </div>


            <script>
            alert(222);





            </script>
            <div class="mui-table-view" style="padding: 10px 0 10px 15px;">
                <label style="line-height: 33px;">体格检查:</label>
                <a id="automatic" class="mui-btn mui-btn-blue" href="javascript:;">自动获取</a>
                <a style="float: right;padding-right: 40px;padding-top: 6px;" id="handClick"
                   class="mui-navigate-right" href="javascript:;">手动填写</a>
            </div>
            <div class="tonyli-row tige">

                <div class="mui-row">
                    <div class="mui-col-sm-7 mui-col-xs-7">
                        <div class="tige-row">
                            <label>体温:</label>
                            <input type="text" id="tiwen" name="tiwen" value=""/>°C
                        </div>
                    </div>
                    <div class="mui-col-sm-5 mui-col-xs-5">
                        <div class="tige-row">
                            <label>心率:</label>
                            <input type="text" id="xinlv" name="xinlv" value=""/>次/分
                        </div>
                    </div>
                    <div class="mui-col-sm-7 mui-col-xs-7">
                        <div class="tige-row">
                            <label>血压:</label>
                            <input type="text" id="xueya" name="xueya" value=""/>mmHG
                        </div>
                    </div>
                    <div class="mui-col-sm-5 mui-col-xs-5">
                        <div class="tige-row">
                            <label>体重:</label>
                            <input type="text" id="weight" name="weight" value=""/>Kg
                        </div>
                    </div>
                    <div class="mui-col-sm-7 mui-col-xs-7">
                        <div class="tige-row">
                            <label>血糖:</label>
                            <input type="text" id="xuetang" name="xuetang" value=""/>mmol/L
                        </div>
                    </div>
                    <div class="mui-col-sm-5 mui-col-xs-5">
                        <div class="tige-row">
                            <label>血氧:</label>
                            <input type="text" id="xueyang" name="xueyang" value=""/>%
                        </div>
                    </div>
                </div>
            </div>
        </form>
        <script>
            alert(111);





        </script>
        <ul class="mui-table-view">
            <li class="mui-table-view-record">
                <div class="tonyli-row" style="border: none;">
                    <img class="mui-pull-left" src="images/newRecordiocn1.png">
                    <label>主诉</label>
                    <textarea onkeyup="_emjo(this)" id="zhusu" placeholder="请填写主诉"></textarea>
                </div>
            </li>
        </ul>
        <ul class="mui-table-view">
            <li class="mui-table-view-record">
                <div class="tonyli-row" style="border: none;">
                    <img class="mui-pull-left" src="images/newRecordiocn2.png">
                    <label>既往史</label>
                    <textarea onkeyup="_emjo(this)" id="jws" placeholder="请填写既往史"></textarea>
                </div>
            </li>
        </ul>


        <ul class="mui-table-view">
            <li class="mui-table-view-cell mui-collapse">
                <a class="mui-navigate-right" href="javascript:;">
                    <img class="mui-pull-left" src="images/newRecordiocn3.png">
                    <label>诊断</label>
                </a>
                <div class="mui-collapse-content">
                    <form class="mui-input-group zhend">
                        <div class="mui-input-row zhenduan1">
                            <input onkeyup="_emjo(this)" type="text" placeholder="请填写诊断1" id="zd1"/>
                        </div>
                        <div class="mui-input-row zhenduan2">
                            <input onkeyup="_emjo(this)" type="text" placeholder="请填写诊断2" id="zd2"/>
                        </div>
                        <div class="mui-input-row zhenduan3">
                            <input onkeyup="_emjo(this)" type="text" placeholder="请填写诊断3" id="zd3"/>
                        </div>

                        <div class="mui-input-row zhenduan4">
                            <input onkeyup="_emjo(this)" type="text" placeholder="请填写诊断4" id="zd4"/>
                        </div>
                        <div class="mui-input-row zhenduan5">
                            <input onkeyup="_emjo(this)" type="text" placeholder="请填写诊断5" id="zd5"/>
                        </div>
                    </form>
                </div>
            </li>
        </ul>

        <script>
            alert(333);





        </script>

        <ul class="mui-table-view newmedica" id="leftSlip">
            <li class="mui-table-view-cell">
                <a class="mui-navigate-new" href="javascript:;">
                    <img class="mui-pull-left" src="images/newRecordiocn4.png">
                    <label>用药方案</label>
                    <img class="mui-pull-right" src="images/newRecordiocn5.png">
                </a>
            </li>
            <div class="close">
            </div>
        </ul>
        <ul class="mui-table-view">
            <li class="mui-table-view-cell mui-navigate-right1" id="headlthPlan">
                <div style="">
                    <img class="mui-pull-left" src="images/headYth.png">
                    <label>健康方案</label>
                </div>
                <p id="headlth" class="ccyc"></p>
            </li>
        </ul>
        <ul class="mui-table-view" style="margin-bottom: 10px;">
            <li class="mui-table-view-cell mui-navigate-right1" id="zhyNotes">
                <div style="">
                    <img class="mui-pull-left" src="images/zyNote.png">
                    <label>注意事项</label>
                </div>
                <p id="zynote" class="ccyc"></p>
            </li>
        </ul>
    </div>
</div>
<script src="js/jquery-1.7.2.min.js"></script>
<script src="js/mui.min.js"></script>
<script src="js/mui.picker.min.js"></script>
<script src="js/grandeHealth.js"></script>

<!--公共js-->
<script src="js/medicalRecord.js"></script>

<!--时间日期选择器-->
<script src="js/dateTime.js"></script>
<!--模板管理功能-->
<script src="js/templateManage.js"></script>
<script>
			/*不可输入表情*/
			function _emjo(btu){
		 		btu.value = btu.value.replace(/[^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac\r\n]/g,'');
			}
								
			/*控制年龄输入范围1-200*/
			$.fn.regInput = function(){
				
				return $(this).each(function(){
					$(this).on('input',function(e){
						if($(this).val()==''){
							return
						}
						if($(this).val()<1||$(this).val()>200){
							$(this).val($(this).data('old_val')||'')
							return false
						}
						$(this).data('old_val',$(this).val())
					})
				})
			}
			$('#age').regInput();
			
			$('.tige .mui-row input[type="text"]').attr('disabled',true);
			$('.tige .mui-row input[type="text"]').css('opacity',1);

			/*
			 *自动获取体格检查
			 */
			function _isNull(){
				
				var tiwenP = $('#tiwen').parents('.mui-col-sm-7'),
					xinlvP = $('#xinlv').parents('.mui-col-sm-5'),
					xueyaP = $('#xueya').parents('.mui-col-sm-7'),
					weightP = $('#weight').parents('.mui-col-sm-5'),
					xuetangP = $('#xuetang').parents('.mui-col-sm-7'),
					xueyangP = $('#xueyang').parents('.mui-col-sm-5');
					
				function _showHide(a,b,c,d){
					
					(a == null) ? b.val('') : b.val(a.replace(d,''));
					(a == d || a == '' || b.val() == '' || b.val() == 0) ? c.hide() : c.show();
				}
				
				/*体温*/	
				_showHide(Tiwen,tiwen,tiwenP,'°C');
				/*心率*/	
				_showHide(Xinlv,xinlv,xinlvP,'次/分');
				/*血压*/	
				_showHide(Xueya,xueya,xueyaP,'mmHg');
				/*体重*/	
				_showHide(Weight,weight,weightP,'kg');
				/*血糖*/	
				_showHide(Xuetang,xuetang,xuetangP,'mmol/L');
				/*血氧*/	
				_showHide(Xueyang,xueyang,xueyangP,'%');

			}
			
			_isNull();
			
			/*
			 * 获取患者信息
			 */
			var sickguid = GetLocationParam('sickguid');
			var deptidnum = GetLocationParam('deptidnum');//机构码
//			sickguid = '5FBC3F95409E0824E050007F01002E5F';
//			deptidnum = 'xh104';
//			XHDOC_APP_USRGUID = "590F10D447DC4ECEE050007F01003690";
			try {
				$.ajax({
					url: XHDOC_WEBBASE + "dtcasehistory/getparticulars?pageNo=1&pageSize=10&sickguid=" + sickguid,
					type: "POST",
					dataType: "json",	
					success: function(data) {
						try {			
							
							if(data.code == 000){
								arry = data.data.usr;
								if(arry.sex == 1){arry.sex = '男';}else if(arry.sex == 2){arry.sex = '女';}
								$('#name').val(arry.name);//姓名
								$('#sex').val(arry.sex);//性别
								$('#idCard').val(arry.MEDICARECARD);//医保卡号
								
							}else{
								mui.toast('填写患者数据失败')
							}	
				
						} catch(e) {
							mui.toast('获取患者数据失败')
						}
					},
					error: function(xhr, textStatus, error) {						
						if(textStatus == "error")
						mui.toast('请检查网络连接');
					}
			
				});
			
			} catch(e) {
				mui.toast("请检查网络连接");
			}

			mui("body").on("tap", "#automatic", function() {
				
				$.ajax({
					url: XHDOC_WEBBASE + "sickblhdr/getDate?deptidnum="+ deptidnum +"&guid=" + sickguid,
					type: "GET",
					dataType: "json",
					success: function(result) {
						
						try {			
							if(result.code == 000){
								
								tiwen.val(result.data.tempera),//体温
								xinlv.val(result.data.heartRate),//心率
								weight.val(result.data.weight),//体重
								xuetang.val(result.data.glucose),//血糖
								xueyang.val(result.data.oxygen);//血氧
								
								if(result.data.tempera == '' || result.data.diastolic == ''){
									
									xueya.val(0);//血压
								}else{
									xueya.val(result.data.tempera +'/'+ result.data.diastolic)//血压
								}
								
								_isNull();
								
							}else{
								mui.toast('提交失败')
							}
				
						} catch(e) {
							mui.toast('获取数据失败')
						}
					},
					error: function(xhr, textStatus, error) {						
						if(textStatus == "error")
						mui.toast('请检查网络连接');
					}					
				});
			})

			/*
			 *手动录入
			 */
			mui("body").on("tap", "#handClick", function() {
				
				_setItem('tiwen',tiwen.val() + '°C')
				_setItem('xinlv',xinlv.val() + '次/分')
				_setItem('xueya',xueya.val() + 'mmHg')
				_setItem('weight',weight.val() + 'kg')
				_setItem('xuetang',xuetang.val() + 'mmol/L')
				_setItem('xueyang',xueyang.val() + '%')
                _setItem("姓名",$('#name').val()+"");
                _setItem("性别",$('#sex').val()+"");
                _setItem("年龄",$('#age').val()+"");
                _setItem("医保卡号",$('#idCard').val()+"");
                _setItem("就诊卡号",$('#viscard').val()+"");
                _setItem("预约门诊就诊时间",$('#offlineTime').val()+"");

                _setItem("主诉",$('#zhusu').val()+"");
                _setItem("既往史",$('#jws').val()+"");
                _setItem("诊断1",$('#zd1').val()+"");
                _setItem("诊断2",$('#zd2').val()+"");
                _setItem("诊断3",$('#zd3').val()+"");
                _setItem("诊断4",$('#zd4').val()+"");
                _setItem("诊断5",$('#zd5').val()+"");
				window.android.showpage('tigeCheck.html');
			})
			

			var medications = JSON.parse(window.localStorage.getItem('alls'));//取值
<!--if(medications==null){-->
<!--medications = [];-->
<!--}-->
			/*
			 * 添加用药方案跳转
			 */
 			mui("body").on("tap", ".newmedica li:nth-child(1)", function() {
 			_setItem("姓名",$('#name').val()+"");
 			_setItem("性别",$('#sex').val()+"");
 			_setItem("年龄",$('#age').val()+"");
 			_setItem("医保卡号",$('#idCard').val()+"");
 			_setItem("就诊卡号",$('#viscard').val()+"");
 			_setItem("预约门诊就诊时间",$('#offlineTime').val()+"");

 			_setItem("主诉",$('#zhusu').val()+"");
 			_setItem("既往史",$('#jws').val()+"");
 			_setItem("诊断1",$('#zd1').val()+"");
 			_setItem("诊断2",$('#zd2').val()+"");
 			_setItem("诊断3",$('#zd3').val()+"");
 			_setItem("诊断4",$('#zd4').val()+"");
 			_setItem("诊断5",$('#zd5').val()+"");
				window.android.showpage('medicationPlan.html');
			})
 			
 			
			/*
			 * 左滑删除
			 */
			mui("#leftSlip").on("tap", ".newmedica .mui-btn", function() {		
				var index = $(this).parents('li').index()-1;//当前li下标								
				var btnArray = ['是', '否'];	//0：是，1：否				
				var elem = this;
				var li = elem.parentNode.parentNode;
				mui.confirm('是否删除该用药方案？', '', btnArray, function(e) {			
					if (e.index == 0) {
						li.parentNode.removeChild(li);//删除自己html
						medications.splice(index,1);
						window.localStorage.setItem('alls',JSON.stringify(medications))//存值
					}
				});	
			})
			
 			/*
			 * 修改用药方案跳转
			 */
 			mui("body").on("tap", ".newmedica .medications", function() {
				var index = $(this).index() - 1;
				_setItem("姓名",$('#name').val()+"");
 			_setItem("性别",$('#sex').val()+"");
 			_setItem("年龄",$('#age').val()+"");
 			_setItem("医保卡号",$('#idCard').val()+"");
 			_setItem("就诊卡号",$('#viscard').val()+"");
 			_setItem("预约门诊就诊时间",$('#offlineTime').val()+"");

 			_setItem("主诉",$('#zhusu').val()+"");
 			_setItem("既往史",$('#jws').val()+"");
 			_setItem("诊断1",$('#zd1').val()+"");
 			_setItem("诊断2",$('#zd2').val()+"");
 			_setItem("诊断3",$('#zd3').val()+"");
 			_setItem("诊断4",$('#zd4').val()+"");
 			_setItem("诊断5",$('#zd5').val()+"");
				window.android.showpage('medicationPlan.html?index='+index)
			})


alert(33333222);
			/*
			 * 添加完用药方案后取值
			 */
			 function load(clear){
			 if(clear != ''){
                $('.close').html("");
			 }
			 var medications = JSON.parse(window.localStorage.getItem('alls'));//取值
			 <!--var medications = m;-->
			 <!--if(medications==null){-->
			 <!--medications = [];-->
			 <!--}-->
			if(medications != null){
				for(var i = 0; i < medications.length; i++){

					if(medications[i].ypnum == undefined){medications[i].ypnum = ''}
					if(medications[i].pc == undefined){medications[i].pc = ''}
					if(medications[i].pian == undefined){medications[i].pian = ''}
					if(medications[i].kfwyname == undefined){medications[i].kfwyname = ''}

					var newmedicaLi =
							'<li class="mui-table-view-cell medications">'+
								'<div class="mui-slider-right mui-disabled">'+
									'<a class="mui-btn mui-btn-red">删除</a>'+
								'</div>'+
								'<div class="mui-slider-handle">'+
									'<div class="medication_plan">'+
								    	'<h4>'+medications[i].drunam+'('+medications[i].unit+')'+'</h4><span>×'+medications[i].ypnum+'</span>'+
								    '</div>'+
								    '<div class="medication_fa">'+
								        '<label>用法:</label>'+
							        	'<p class="pAll">'+medications[i].kfwyname+'，'+medications[i].pc+'，'+medications[i].pian+'</p>'+
								    '</div>'+
								'</div>';
							'</li>';
					$('.close').append(newmedicaLi);
				}
			}
			}
alert(33333);
			/*
			 * 新增病历
			 */
			function doaddbl() {

            _setItem("姓名",$('#name').val()+"");
 			_setItem("性别",$('#sex').val()+"");
 			_setItem("年龄",$('#age').val()+"");
 			_setItem("医保卡号",$('#idCard').val()+"");
 			_setItem("就诊卡号",$('#viscard').val()+"");
 			_setItem("预约门诊就诊时间",$('#offlineTime').val()+"");

 			_setItem("主诉",$('#zhusu').val()+"");
 			_setItem("既往史",$('#jws').val()+"");
 			_setItem("诊断1",$('#zd1').val()+"");
 			_setItem("诊断2",$('#zd2').val()+"");
 			_setItem("诊断3",$('#zd3').val()+"");
 			_setItem("诊断4",$('#zd4').val()+"");
 			_setItem("诊断5",$('#zd5').val()+"");
				var webUrl = XHDOC_WEBBASE + "sickblhdr/createSickblhdr";
				var sex = sexSe($('#sex').val());//性别
				if(sex == false){return;}else{
					if($('#sex').val() == '男'){sexs = 1;}else if($('#sex').val() == '女'){sexs = 2;}
				}

				var zhend = [];//诊断
				function _zdEq(eqi){

					var zhenD = $('.zhenduan'+eqi+' input').val();
					if(zhenD != ''){
						zhend.push(zhenD)
					}
				}
				_zdEq(1),_zdEq(2),_zdEq(3),_zdEq(4),_zdEq(5);

				zhend = JSON.stringify(zhend).replace(/\"/g,'');//去"
				zhend = zhend.replace(/\[/g,'');//去[
				zhend = zhend.replace(/\]/g,'');//去]

				var mode = {
					"sick":[{
						"sickguid": sickguid,
						"docguid":XHDOC_APP_USRGUID,
						"doc":XHDOC_APP_USRNAM,
				        "name":$('#name').val(),//姓名
				        "sex":sexs,//性别
				        "age":$('#age').val(),
				        "ageoptions": "岁",
				        "cardid": $('#viscard').val(),//就诊卡号
				        "medicarecard": $('#idCard').val(),//医保卡号
				        "mainn": $('#zhusu').val(),//主诉
				        "jws":$('#jws').val(),//既往史
				        "tw":tiwen.val(),//体温
						"clucose":xuetang.val(),//血糖
						"xl":xinlv.val(),//心率
						"xy1":xueya.val().substr(0,3),//血压上
        				"xy2":xueya.val().substr(4,2),//血压下
						"weight":weight.val(),//体重
						"glucose":xueyang.val(),//血氧
						"clinicaltime":$('#offlineTime').val().substr(0,10),//预约门诊就诊时间
						"periodtime":$('#offlineTime').val().substr(11,2),//预约门诊就诊时间时段(上午，下午)
						"bjfa":$('#headlth').html(),//健康方案
						"note":$('#zynote').html(),//注意事项
					}],
					"dts":medications,
				 	"check":[
			            {
			                "projectname":"",
			                "remarks":""
			            }
			        ],
					"plan":[
			            {
			                "followoption":"",
			                "followdatetime":""
			            }
			        ],
					"diagnosis":[{
						"zhand":"",
						"zdname":zhend
					}],
					"flag":"1",
					"userid":"",
					"docid":""
				};

				try {
//					姓名 、性别、年龄、主诉为必输项
					if($('#name').val() == ''){
						mui.toast('姓名不能为空')
					}
					else if($('#age').val() == ''){
						mui.toast('年龄不能为空')
					}
					else if($('#zhusu').val() == ''){
						mui.toast('主诉不能为空')
					}
					else{
					window.android.debug(''+JSON.stringify(mode));
						$.ajax({
							url: webUrl,
							type: "POST",
							dataType: "json",
							contentType: "application/json",
							data:JSON.stringify(mode),
							success: function(data) {

								try {
									if(data.code == 000){

										mui.toast('保存成功');
										//可以查看的病历
//										setTimeout(showpage('view_medical_record.html?caseGuid='+data.data.guid),10000);
										/*数据*/
										window.localStorage.setItem("blid",data.data.guid);
										console.log($('#name').val())//患者姓名
										console.log(sexs)//性别
										console.log($('#age').val())//年龄
										console.log(zhend)//诊断

										localStorage.removeItem('alls');
										localStorage.removeItem('headlthPlan');
										localStorage.removeItem('zhyNotes');
										localStorage.removeItem('tiwen');
										localStorage.removeItem('xinlv');
										localStorage.removeItem('xueya');
										localStorage.removeItem('weight');
										localStorage.removeItem('xuetang');
										localStorage.removeItem('xueyang');
										var addbli = '咨询建议'
										+'\n姓名:'+window.localStorage.getItem('姓名')
										+'\n性别:'+window.localStorage.getItem('性别')
										+'\n年龄:'+window.localStorage.getItem('年龄')
										+'\n诊断:'+ window.localStorage.getItem('诊断1');
										window.android.addbli(data.data.guid+'',addbli)//病历id

									}else{
										mui.toast('提交失败')
									}

								} catch(e) {
									mui.toast('获取数据失败')
								}
							},
							error: function(xhr, textStatus, error) {
								mui.toast(error+'');

							}
						});
					}

				} catch(e) {
					mui.toast("请检查网络连接");
				}
			}

mui("body").on("tap", "#submit", doaddbl());



</script>
</body>
</html>


